/*
 * wplabel.cpp
 *
 *  Created on: 2.12.2009
 *      Author: jkal
 */

#include <QMouseEvent>

#include "wplabel.h"

WPLabel::WPLabel(QWidget *aParent) : QLabel(aParent)
{
}

WPLabel::~WPLabel()
{
}

void WPLabel::mousePressEvent(QMouseEvent *e)
{
    e->accept();
    if (textFormat() == Qt::RichText)
        QWidget::mousePressEvent(e);
    else
        QLabel::mousePressEvent(e);
}

void WPLabel::mouseMoveEvent(QMouseEvent *e)
{
    if (textFormat() == Qt::RichText)
        QWidget::mouseMoveEvent(e);
    else
        QLabel::mouseMoveEvent(e);
}

void WPLabel::mouseReleaseEvent(QMouseEvent *e)
{
    if (textFormat() == Qt::RichText)
        QWidget::mouseReleaseEvent(e);
    else
        QLabel::mouseReleaseEvent(e);
}
